<template>
	<view class="content">

		<!-- 顶图 -->
		<h-com-banner ></h-com-banner>
		<!-- <view class="top-slider">
			<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
				:duration="duration">
				<swiper-item>
					<view class="swiper-item">
						<image src="../../static/temp-photo-02.png" mode="widthFix"></image>
						<view class="corner-sign vip-belong"></view>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image src="../../static/temp-photo.jpg" mode="widthFix"></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image src="../../static/temp-vipAd.webp" mode="widthFix"></image>
					</view>
				</swiper-item>
			</swiper>
			<view class="wiper-item-info">
				<view class="item-info"><icon type="" class="fontIcon icon-number-hot"/>819034</view>
				<view class="item-number"><text class="current-number">1</text>/100</view>
			</view>
		</view> -->

		<!-- 主菜单 -->
	<!-- 	<view class="activity-menu-bar">
			<button class="btn-all-activity">
				<icon type="" class="imgIcon icon-all-activity"></icon>
				<text>全部活动</text>
			</button>
			<button class="btn-my-activity">
				<icon type="" class="imgIcon icon-my-activity"></icon>
				<text>我的活动</text>
			</button>
			<button class="gameCenter-button">
				<icon type="" class="imgIcon icon-game-center"></icon>
				<text>游戏中心</text>
			</button>
		</view> -->

		<!-- 活动列表 -->
		<view class="activity-card-list">
			<view class="list-header-bar ">
				<text class="header-title">优选活动</text>
				<!-- <view class="header-buttons">
					<button class="btn-goto">全部<icon type="" class="fontIcon icon-goto"/></button>
				</view> -->
			</view>
			<view class="activity-card" v-for="(item,index) in upk.data" :key="index ">
				<view class="preview-img">
					<image :src="item.cigarGame.gameFileUrl[0]" mode="widthFix" @click="gotoDetail(item.cigarGame.showpicLink)" ></image>
					<view class="corner-sign" v></view>
				</view>
				<view class="activity-info">
					<view class="name">{{item.cigarGame.title}}</view>
					<view class="heat"><icon type="" class="fontIcon icon-number-hot" />12830912</view>
					<view class="time">2023.10.20~2023.10.30</view>
				</view>
			</view>
<!-- 			<view class="activity-card">
				<view class="preview-img">
					<image src="../../static/temp-photo.jpg" mode="widthFix"></image>
				</view>
				<view class="activity-info">
					<view class="name">黑胡桃木雪茄黑胡桃木雪茄</view>
					<view class="heat">
						<icon type="" class="fontIcon icon-number-hot" />12830912
					</view>
					<view class="time">2023.10.20~2023.10.30</view>
				</view>
			</view>
			<view class="activity-card">
				<view class="preview-img">
					<image src="../../static/temp-photo.jpg" mode="widthFix"></image>
				</view>
				<view class="activity-info">
					<view class="name">黑胡桃木雪茄黑胡桃木雪茄</view>
					<view class="heat">
						<icon type="" class="fontIcon icon-number-hot" />12830912
					</view>
					<view class="time">2023.10.20~2023.10.30</view>
				</view>
			</view>
			<view class="activity-card">
				<view class="preview-img">
					<image src="../../static/temp-photo.jpg" mode="widthFix"></image>
				</view>
				<view class="activity-info">
					<view class="name">黑胡桃木雪茄黑胡桃木雪茄</view>
					<view class="heat">
						<icon type="" class="fontIcon icon-number-hot" />12830912
					</view>
					<view class="time">2023.10.20~2023.10.30</view>
				</view>
			</view>
			<view class="activity-card">
				<view class="preview-img">
					<image src="../../static/temp-photo.jpg" mode="widthFix"></image>
				</view>
				<view class="activity-info">
					<view class="name">黑胡桃木雪茄黑胡桃木雪茄</view>
					<view class="heat">
						<icon type="" class="fontIcon icon-number-hot" />12830912
					</view>
					<view class="time">2023.10.20~2023.10.30</view>
				</view>
			</view> -->
		</view>
		<!-- 浮动底栏位置补偿 -->
		<view class="filler-block"></view>
	</view>
</template>
<script setup>
	import { HTTP_API_URL } from '@/common/consts/Consts';
	import { HttpMethod, httpUtil } from '@/common/netWork/httpUtil';
	import { onLaunch ,onLoad} from '@dcloudio/uni-app';
	import {ref,onBeforeMount,watch, reactive} from "vue"
	// let bannerData = reactive({
	// 	data:{}
	// })
	let upk = reactive({
		data:{}
	})
  const	gotoDetail =(url)=>{
		// console.log(url)
		// localStorage.setItem('imgUrl',url)
		uni.navigateTo({
			url:`/pages/activity-detail/activity-detail?imgUrl=${url}`,
		})
	}
	// 其实这是拟组建用的东西数据效果会更好 拿过去 
	
	// const getSS = async ()=>{
	// 	let {data}=  await httpUtil.request(HTTP_API_URL.MSG_MAOZASA,HttpMethod.POST,{"cityCode":"9999"})
	// 	bannerData.data = JSON.parse(data)
	// }
	// console.log(bannerData)
	const requset = async ()=>{
		let homeData= await httpUtil.request(HTTP_API_URL.MSG_ACTIVITYLIST,HttpMethod.POST,{"gameStatus":"2","gameType":"-2","upkId":""})
		console.log(JSON.parse(homeData.data))
		upk.data = JSON.parse(homeData.data)
	 }
 onBeforeMount(()=>{
	 requset()
 })
</script> 